package net.lzzy.practices.entities;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Entity
@Getter
@Setter
public class Result extends BaseEntity {
    @Transient
    public static final int TYPE_RIGHT=0;
    @Transient
    public static final int TYPE_MISS=1;
    @Transient
    public static final int TYPE_EXTRA=2;
    @Transient
    public static final int TYPE_WRONG=3;
    @Transient
    public static final int TYPE_UNDO=4;

    @Temporal(TemporalType.TIMESTAMP)
    private Date commitTime;
    @ManyToOne
    private User student;

    @ManyToOne
    private Question question;
    @ManyToMany
    private List<Option> options =new ArrayList<>();

    public Result(){
        commitTime=new Date();
    }
}
